<script>
	export default {
		onLaunch: function() {
			uni.getStorage({
				'key':'app-user',
				success: (res) => {
					console.log('缓存中已经找到登录信息：准备跳转到首页');
					uni.switchTab({url:'/pages/index',success: () => {
						// #ifdef APP-PLUS
						plus.navigator.closeSplashscreen();
						// #endif
					}});
				},fail: () => {
					console.log('缓存中没有找到登录信息：准备跳转到登录页面');
					uni.reLaunch({url:'/pages/login',success: () => {
						// #ifdef APP-PLUS
						plus.navigator.closeSplashscreen();
						// #endif
					}})
				}
			})
			console.log('App Launch')
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style>
	/*每个页面公共css */
	@import './common/css/uni.css';
	@import './common/css/ceuer.css';
	@import './common/css/iconfont.css';
</style>
